package wrapper;

public class Str extends AbstractObject{
	protected String value;
	private static final int shift = 6;
	private static final int mask = ~0 << (32 - shift);
	
	public Str(String value)
	{
		this.value = value;
	}
	
	public String getValue() {
		return value;
	}


	public void setValue(String value) {
		this.value = value;
	}

	protected int compareTo(Comparable object) {
		Str arg = (Str) object;
		return value.compareTo(arg.value);
	}
	
	public int hashCode()
	{
		int result = 0;
		for(int i = 0; i < value.length(); i++)
			result = (result & mask) ^ (result << shift) ^ value.charAt(i);
		return result;
	}
}